//
//  StationReportDetailViewController.m
//  Runone
//
//  Created by runone01 on 16/9/1.
//  Copyright © 2016年 runone. All rights reserved.
//

#import "StationReportDetailViewController.h"

@interface StationReportDetailViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UIImageView *LogImage;
@property (weak, nonatomic) IBOutlet UILabel *StationLabel;
@property (weak, nonatomic) IBOutlet UILabel *PerpleLabel;
@property (weak, nonatomic) IBOutlet UILabel *EventType;
@property (weak, nonatomic) IBOutlet UILabel *TimeLabel;
@property (strong, nonatomic) IBOutlet UITableView *TableViewImage;

@end

@implementation StationReportDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self LoadMessage];
    self.TableViewImage=[[UITableView alloc] init];
    self.TableViewImage.delegate=self;
    self.TableViewImage.dataSource=self;
    // Do any additional setup after loading the view from its nib.
}

-(void)LoadMessage
{
    self.StationLabel.text=@"你给我个收费站我就显示";
    self.PerpleLabel.text=self.model.DutyMonitor;
    self.EventType.text=self.model.EventType;
    self.TimeLabel.text=self.model.OccurTime;
    
    
    UIView *view=[[UIView alloc] init];
    UILabel *descriptionLabel=[[UILabel alloc] init];
    descriptionLabel.text=[NSString stringWithFormat:@"事件详情 :   \n%@",self.model.EventDescription];
    descriptionLabel.numberOfLines=0;
    CGSize max=CGSizeMake(self.view.frame.size.width, 9999);
    CGSize newsize=[descriptionLabel sizeThatFits:max];
    descriptionLabel.frame=CGRectMake(35, 0, self.view.frame.size.width, newsize.height);
    view.backgroundColor=[UIColor greenColor];
    descriptionLabel.backgroundColor=[UIColor grayColor];
    
    view.frame=CGRectMake(0, 0, self.view.frame.size.width, newsize.height);
    [view addSubview:descriptionLabel];
    self.TableViewImage.tableHeaderView=view;
    
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 0;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    return 0;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
